﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JjzbIndex.aspx.cs" Inherits="Xiaov.SmartWeb.Application.HXZB.JjzbIndex" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>经济指标</title>
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>
    <script type='text/javascript' src='../../SupCan/binary/dynaload.js?11'></script>
    <script type="text/javascript" language="javascript">
        var count = 0;
        function OnReady(id) {
            count++;
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            var dwbm = "HB";
            if (id == "AF") {
                form1.AF.func("Build", "JjzbIndex.xml");
                form1.AF.func("Load", "JjzbIndexData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm));
            }
            if (count == 2) {
                var zbmc = "主营业务收入";
                var zbbm = "";
                for (var row = form1.AF.func("GetNextValidRow", ""); row != ""; row = form1.AF.func("GetNextValidRow", row)) {
                    if (form1.AF.func("GetCellData", row + "\r\nzbmc") == zbmc) {
                        zbbm = form1.AF.func("GetCellData", row + "\r\nzbbm");
                        break;
                    }
                }
                AddSeries(zbmc, zbbm, dwbm, nf, yf); //右上图
            }
        }
        function OnEvent(id, Event, p1, p2, p3, p4) {
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            var dwbm = "HB";
            if (id == "AF" && Event == "Clicked" && p2 == "zbmc" && p3 != "") {//点击超链接时 
                var zbmc = document.AF.func("GetCellData", p1 + "\r\nzbmc\r\nfalse");
                var zbbm = document.AF.func("GetCellData", p1 + "\r\nzbbm\r\nfalse");
                AddSeries(zbmc, zbbm, dwbm, nf, yf); //右上图
            }
        }
        function AddSeries(zbmc, zbbm, dwbm, nf, yf) {//右上图
            document.AF1.func("SetProp", "Caption\r\n" + zbmc);
            document.AF1.func("DeleteAllSeries", "");
            var titles = "", bndatas = "", qndatas = "";
            titles = document.AF1.func("download", "JjzbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=title \r\n toString=true; isEcho=false");
            bndatas = document.AF1.func("download", "JjzbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=bnlj \r\n toString=true; isEcho=false");
            qndatas = document.AF1.func("download", "JjzbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=qntq \r\n toString=true; isEcho=false");
            document.AF1.func("AddSeries", "本年累计 \r\n" + titles + "\r\n" + bndatas);
            document.AF1.func("AddSeries", "去年同期 \r\n" + titles + "\r\n" + qndatas);
        }

        $(function () {
            $('#content').height(userScreenHeight);
        });
    </script>
</head>
<body>
    <form id="form1" runat="server" action="JjzbIndex.aspx" method="post">
    <div id="content" style="overflow: scroll;">
        <div class="tools">
            <asp:DropDownList ID="ddl_Owner" runat="server" Visible="false">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_Year" runat="server">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_Month" runat="server">
            </asp:DropDownList>
            <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
        </div>
        <table style="width: 99%">
            <tr>
                <td style="width: 40%">
                </td>
                <td style="width: 10%">
                </td>
                <td style="width: 49%">
                </td>
            </tr>
            <tr>
                <td>
                    <div style="height: 300px; width: 100%">
                        <script language="javascript" type="text/javascript">
                            insertTreeList('AF', '') 
                        </script>
                    </div>
                </td>
                <td colspan="2">
                    <div style="height: 300px; width: 100%">
                        <script language="javascript" type="text/javascript">
                            insertChart('AF1', 'chart=1;textContent=0;bordercolor=#4499ff; borderWidth=2; borderRound=23;backcolor=#fff5ea,#f0e0d0;valueMask=####');
                        </script>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
